package com.sch.hospital.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sch.hospital.Mapper.TimeslotMapper;
import com.sch.hospital.domain.Timeslot;
import com.sch.hospital.service.ITimeslotService;

/**
 * 预约时间段Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-30
 */
@Service
public class TimeslotServiceImpl implements ITimeslotService 
{
    @Autowired
    private TimeslotMapper timeslotMapper;

    /**
     * 查询预约时间段
     * 
     * @param id 预约时间段主键
     * @return 预约时间段
     */
    @Override
    public Timeslot selectTimeslotById(Long id)
    {
        return timeslotMapper.selectTimeslotById(id);
    }

    /**
     * 查询预约时间段列表
     * 
     * @param timeslot 预约时间段
     * @return 预约时间段
     */
    @Override
    public List<Timeslot> selectTimeslotList(Timeslot timeslot)
    {
        return timeslotMapper.selectTimeslotList(timeslot);
    }

    /**
     * 新增预约时间段
     * 
     * @param timeslot 预约时间段
     * @return 结果
     */
    @Override
    public int insertTimeslot(Timeslot timeslot)
    {
        return timeslotMapper.insertTimeslot(timeslot);
    }

    /**
     * 修改预约时间段
     * 
     * @param timeslot 预约时间段
     * @return 结果
     */
    @Override
    public int updateTimeslot(Timeslot timeslot)
    {
        return timeslotMapper.updateTimeslot(timeslot);
    }

    /**
     * 批量删除预约时间段
     * 
     * @param ids 需要删除的预约时间段主键
     * @return 结果
     */
    @Override
    public int deleteTimeslotByIds(Long[] ids)
    {
        return timeslotMapper.deleteTimeslotByIds(ids);
    }

    /**
     * 删除预约时间段信息
     * 
     * @param id 预约时间段主键
     * @return 结果
     */
    @Override
    public int deleteTimeslotById(Long id)
    {
        return timeslotMapper.deleteTimeslotById(id);
    }
}
